<!DOCTYPE HTML>
<!-- NewPage -->
<html lang="en">
<head><!-- start favicons snippet, use https://realfavicongenerator.net/ --><link rel="apple-touch-icon" sizes="180x180" href="/assets/apple-touch-icon.png"><link rel="icon" type="image/png" sizes="32x32" href="/assets/favicon-32x32.png"><link rel="icon" type="image/png" sizes="16x16" href="/assets/favicon-16x16.png"><link rel="manifest" href="/assets/site.webmanifest"><link rel="mask-icon" href="/assets/safari-pinned-tab.svg" color="#fc4d50"><link rel="shortcut icon" href="/assets/favicon.ico"><meta name="msapplication-TileColor" content="#ffc40d"><meta name="msapplication-config" content="/assets/browserconfig.xml"><meta name="theme-color" content="#ffffff"><!-- end favicons snippet -->
<title>Transformer (ExoPlayer library)</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style">
<link rel="stylesheet" type="text/css" href="../../../../../jquery/jquery-ui.css" title="Style">
<script type="text/javascript" src="../../../../../script.js"></script>
<script type="text/javascript" src="../../../../../jquery/jszip/dist/jszip.min.js"></script>
<script type="text/javascript" src="../../../../../jquery/jszip-utils/dist/jszip-utils.min.js"></script>
<!--[if IE]>
<script type="text/javascript" src="../../../../../jquery/jszip-utils/dist/jszip-utils-ie.min.js"></script>
<![endif]-->
<script type="text/javascript" src="../../../../../jquery/jquery-3.5.1.js"></script>
<script type="text/javascript" src="../../../../../jquery/jquery-ui.js"></script>
</head>
<body>
<script type="text/javascript"><!--
    try {
        if (location.href.indexOf('is-external=true') == -1) {
            parent.document.title="Transformer (ExoPlayer library)";
        }
    }
    catch(err) {
    }
//-->
var data = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10,"i5":10,"i6":10};
var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]};
var altColor = "altColor";
var rowColor = "rowColor";
var tableTab = "tableTab";
var activeTableTab = "activeTableTab";
var pathtoroot = "../../../../../";
var useModuleDirectories = false;
loadScripts(document, 'script');</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<header role="banner">
<nav role="navigation">
<div class="fixedNav">
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a id="navbar.top">
<!--   -->
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a id="navbar.top.firstrow">
<!--   -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../index.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../../allclasses.html">All&nbsp;Classes</a></li>
</ul>
<ul class="navListSearch">
<li><label for="search">SEARCH:</label>
<input type="text" id="search" value="search" disabled="disabled">
<input type="reset" id="reset" value="reset" disabled="disabled">
</li>
</ul>
<div>
<script type="text/javascript"><!--
  allClassesLink = document.getElementById("allclasses_navbar_top");
  if(window==top) {
    allClassesLink.style.display = "block";
  }
  else {
    allClassesLink.style.display = "none";
  }
  //-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li><a href="#nested.class.summary">Nested</a>&nbsp;|&nbsp;</li>
<li><a href="#field.summary">Field</a>&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li><a href="#field.detail">Field</a>&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a id="skip.navbar.top">
<!--   -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
</div>
<div class="navPadding">&nbsp;</div>
<script type="text/javascript"><!--
$('.navPadding').css('padding-top', $('.fixedNav').css("height"));
//-->
</script>
</nav>
</header>
<!-- ======== START OF CLASS DATA ======== -->
<main role="main">
<div class="header">
<div class="subTitle"><span class="packageLabelInType">Package</span>&nbsp;<a href="package-summary.html">com.google.android.exoplayer2.transformer</a></div>
<h2 title="Class Transformer" class="title">Class Transformer</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li><a href="https://developer.android.com/reference/java/lang/Object.html" title="class or interface in java.lang" class="externalLink" target="_top">java.lang.Object</a></li>
<li>
<ul class="inheritance">
<li>com.google.android.exoplayer2.transformer.Transformer</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<hr>
<pre>@RequiresApi(18)
public final class <span class="typeNameLabel">Transformer</span>
extends <a href="https://developer.android.com/reference/java/lang/Object.html" title="class or interface in java.lang" class="externalLink" target="_top">Object</a></pre>
<div class="block">A transformer to transform media inputs.

 <p>The same Transformer instance can be used to transform multiple inputs (sequentially, not
 concurrently).

 <p>Transformer instances must be accessed from a single application thread. For the vast majority
 of cases this should be the application's main thread. The thread on which a Transformer instance
 must be accessed can be explicitly specified by passing a <a href="https://developer.android.com/reference/android/os/Looper.html" title="class or interface in android.os" class="externalLink" target="_top"><code>Looper</code></a> when creating the
 transformer. If no Looper is specified, then the Looper of the thread that the <a href="Transformer.Builder.html" title="class in com.google.android.exoplayer2.transformer"><code>Transformer.Builder</code></a> is created on is used, or if that thread does not have a Looper, the Looper
 of the application's main thread is used. In all cases the Looper of the thread from which the
 transformer must be accessed can be queried using <a href="#getApplicationLooper()"><code>getApplicationLooper()</code></a>.</div>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ======== NESTED CLASS SUMMARY ======== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="nested.class.summary">
<!--   -->
</a>
<h3>Nested Class Summary</h3>
<table class="memberSummary">
<caption><span>Nested Classes</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colSecond" scope="col">Class</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static class&nbsp;</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="Transformer.Builder.html" title="class in com.google.android.exoplayer2.transformer">Transformer.Builder</a></span></code></th>
<td class="colLast">
<div class="block">A builder for <a href="Transformer.html" title="class in com.google.android.exoplayer2.transformer"><code>Transformer</code></a> instances.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static interface&nbsp;</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="Transformer.Listener.html" title="interface in com.google.android.exoplayer2.transformer">Transformer.Listener</a></span></code></th>
<td class="colLast">
<div class="block">A listener for the transformation events.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static interface&nbsp;</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="Transformer.ProgressState.html" title="annotation in com.google.android.exoplayer2.transformer">Transformer.ProgressState</a></span></code></th>
<td class="colLast">
<div class="block">Progress state.</div>
</td>
</tr>
</table>
</li>
</ul>
</section>
<!-- =========== FIELD SUMMARY =========== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="field.summary">
<!--   -->
</a>
<h3>Field Summary</h3>
<table class="memberSummary">
<caption><span>Fields</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colSecond" scope="col">Field</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#PROGRESS_STATE_AVAILABLE">PROGRESS_STATE_AVAILABLE</a></span></code></th>
<td class="colLast">
<div class="block">Indicates that the progress is available.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#PROGRESS_STATE_NO_TRANSFORMATION">PROGRESS_STATE_NO_TRANSFORMATION</a></span></code></th>
<td class="colLast">
<div class="block">Indicates that there is no current transformation.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#PROGRESS_STATE_UNAVAILABLE">PROGRESS_STATE_UNAVAILABLE</a></span></code></th>
<td class="colLast">
<div class="block">Indicates that the progress is permanently unavailable for the current transformation.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#PROGRESS_STATE_WAITING_FOR_AVAILABILITY">PROGRESS_STATE_WAITING_FOR_AVAILABILITY</a></span></code></th>
<td class="colLast">
<div class="block">Indicates that the progress is unavailable for the current transformation, but might become
 available.</div>
</td>
</tr>
</table>
</li>
</ul>
</section>
<!-- ========== METHOD SUMMARY =========== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="method.summary">
<!--   -->
</a>
<h3>Method Summary</h3>
<table class="memberSummary">
<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd">&nbsp;</span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd">&nbsp;</span></span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colSecond" scope="col">Method</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tr id="i0" class="altColor">
<td class="colFirst"><code><a href="Transformer.Builder.html" title="class in com.google.android.exoplayer2.transformer">Transformer.Builder</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#buildUpon()">buildUpon</a></span>()</code></th>
<td class="colLast">
<div class="block">Returns a <a href="Transformer.Builder.html" title="class in com.google.android.exoplayer2.transformer"><code>Transformer.Builder</code></a> initialized with the values of this instance.</div>
</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#cancel()">cancel</a></span>()</code></th>
<td class="colLast">
<div class="block">Cancels the transformation that is currently in progress, if any.</div>
</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code><a href="https://developer.android.com/reference/android/os/Looper.html" title="class or interface in android.os" class="externalLink" target="_top">Looper</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getApplicationLooper()">getApplicationLooper</a></span>()</code></th>
<td class="colLast">
<div class="block">Returns the <a href="https://developer.android.com/reference/android/os/Looper.html" title="class or interface in android.os" class="externalLink" target="_top"><code>Looper</code></a> associated with the application thread that's used to access the
 transformer and on which transformer events are received.</div>
</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code>int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getProgress(com.google.android.exoplayer2.transformer.ProgressHolder)">getProgress</a></span>&#8203;(<a href="ProgressHolder.html" title="class in com.google.android.exoplayer2.transformer">ProgressHolder</a>&nbsp;progressHolder)</code></th>
<td class="colLast">
<div class="block">Returns the current <a href="Transformer.ProgressState.html" title="annotation in com.google.android.exoplayer2.transformer"><code>Transformer.ProgressState</code></a> and updates <code>progressHolder</code> with the current
 progress if it is <a href="#PROGRESS_STATE_AVAILABLE"><code>available</code></a>.</div>
</td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setListener(com.google.android.exoplayer2.transformer.Transformer.Listener)">setListener</a></span>&#8203;(<a href="Transformer.Listener.html" title="interface in com.google.android.exoplayer2.transformer">Transformer.Listener</a>&nbsp;listener)</code></th>
<td class="colLast">
<div class="block">Sets the <a href="Transformer.Listener.html" title="interface in com.google.android.exoplayer2.transformer"><code>Transformer.Listener</code></a> to listen to the transformation events.</div>
</td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#startTransformation(com.google.android.exoplayer2.MediaItem,android.os.ParcelFileDescriptor)">startTransformation</a></span>&#8203;(<a href="../MediaItem.html" title="class in com.google.android.exoplayer2">MediaItem</a>&nbsp;mediaItem,
                   <a href="https://developer.android.com/reference/android/os/ParcelFileDescriptor.html" title="class or interface in android.os" class="externalLink" target="_top">ParcelFileDescriptor</a>&nbsp;parcelFileDescriptor)</code></th>
<td class="colLast">
<div class="block">Starts an asynchronous operation to transform the given <a href="../MediaItem.html" title="class in com.google.android.exoplayer2"><code>MediaItem</code></a>.</div>
</td>
</tr>
<tr id="i6" class="altColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#startTransformation(com.google.android.exoplayer2.MediaItem,java.lang.String)">startTransformation</a></span>&#8203;(<a href="../MediaItem.html" title="class in com.google.android.exoplayer2">MediaItem</a>&nbsp;mediaItem,
                   <a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a>&nbsp;path)</code></th>
<td class="colLast">
<div class="block">Starts an asynchronous operation to transform the given <a href="../MediaItem.html" title="class in com.google.android.exoplayer2"><code>MediaItem</code></a>.</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a id="methods.inherited.from.class.java.lang.Object">
<!--   -->
</a>
<h3>Methods inherited from class&nbsp;java.lang.<a href="https://developer.android.com/reference/java/lang/Object.html" title="class or interface in java.lang" class="externalLink" target="_top">Object</a></h3>
<code><a href="https://developer.android.com/reference/java/lang/Object.html#clone()" title="class or interface in java.lang" class="externalLink">clone</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.lang" class="externalLink">equals</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#finalize()" title="class or interface in java.lang" class="externalLink">finalize</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#getClass()" title="class or interface in java.lang" class="externalLink">getClass</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#hashCode()" title="class or interface in java.lang" class="externalLink">hashCode</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#notify()" title="class or interface in java.lang" class="externalLink">notify</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#notifyAll()" title="class or interface in java.lang" class="externalLink">notifyAll</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#toString()" title="class or interface in java.lang" class="externalLink">toString</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#wait()" title="class or interface in java.lang" class="externalLink">wait</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#wait(long)" title="class or interface in java.lang" class="externalLink">wait</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#wait(long,int)" title="class or interface in java.lang" class="externalLink" target="_top">wait</a></code></li>
</ul>
</li>
</ul>
</section>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ============ FIELD DETAIL =========== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="field.detail">
<!--   -->
</a>
<h3>Field Detail</h3>
<a id="PROGRESS_STATE_WAITING_FOR_AVAILABILITY">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>PROGRESS_STATE_WAITING_FOR_AVAILABILITY</h4>
<pre>public static final&nbsp;int PROGRESS_STATE_WAITING_FOR_AVAILABILITY</pre>
<div class="block">Indicates that the progress is unavailable for the current transformation, but might become
 available.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../constant-values.html#com.google.android.exoplayer2.transformer.Transformer.PROGRESS_STATE_WAITING_FOR_AVAILABILITY">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a id="PROGRESS_STATE_AVAILABLE">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>PROGRESS_STATE_AVAILABLE</h4>
<pre>public static final&nbsp;int PROGRESS_STATE_AVAILABLE</pre>
<div class="block">Indicates that the progress is available.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../constant-values.html#com.google.android.exoplayer2.transformer.Transformer.PROGRESS_STATE_AVAILABLE">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a id="PROGRESS_STATE_UNAVAILABLE">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>PROGRESS_STATE_UNAVAILABLE</h4>
<pre>public static final&nbsp;int PROGRESS_STATE_UNAVAILABLE</pre>
<div class="block">Indicates that the progress is permanently unavailable for the current transformation.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../constant-values.html#com.google.android.exoplayer2.transformer.Transformer.PROGRESS_STATE_UNAVAILABLE">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a id="PROGRESS_STATE_NO_TRANSFORMATION">
<!--   -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>PROGRESS_STATE_NO_TRANSFORMATION</h4>
<pre>public static final&nbsp;int PROGRESS_STATE_NO_TRANSFORMATION</pre>
<div class="block">Indicates that there is no current transformation.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../constant-values.html#com.google.android.exoplayer2.transformer.Transformer.PROGRESS_STATE_NO_TRANSFORMATION">Constant Field Values</a></dd>
</dl>
</li>
</ul>
</li>
</ul>
</section>
<!-- ============ METHOD DETAIL ========== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="method.detail">
<!--   -->
</a>
<h3>Method Detail</h3>
<a id="buildUpon()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>buildUpon</h4>
<pre class="methodSignature">public&nbsp;<a href="Transformer.Builder.html" title="class in com.google.android.exoplayer2.transformer">Transformer.Builder</a>&nbsp;buildUpon()</pre>
<div class="block">Returns a <a href="Transformer.Builder.html" title="class in com.google.android.exoplayer2.transformer"><code>Transformer.Builder</code></a> initialized with the values of this instance.</div>
</li>
</ul>
<a id="setListener(com.google.android.exoplayer2.transformer.Transformer.Listener)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setListener</h4>
<pre class="methodSignature">public&nbsp;void&nbsp;setListener&#8203;(<a href="Transformer.Listener.html" title="interface in com.google.android.exoplayer2.transformer">Transformer.Listener</a>&nbsp;listener)</pre>
<div class="block">Sets the <a href="Transformer.Listener.html" title="interface in com.google.android.exoplayer2.transformer"><code>Transformer.Listener</code></a> to listen to the transformation events.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>listener</code> - A <a href="Transformer.Listener.html" title="interface in com.google.android.exoplayer2.transformer"><code>Transformer.Listener</code></a>.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://developer.android.com/reference/java/lang/IllegalStateException.html" title="class or interface in java.lang" class="externalLink" target="_top">IllegalStateException</a></code> - If this method is called from the wrong thread.</dd>
</dl>
</li>
</ul>
<a id="startTransformation(com.google.android.exoplayer2.MediaItem,java.lang.String)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>startTransformation</h4>
<pre class="methodSignature">public&nbsp;void&nbsp;startTransformation&#8203;(<a href="../MediaItem.html" title="class in com.google.android.exoplayer2">MediaItem</a>&nbsp;mediaItem,
                                <a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a>&nbsp;path)
                         throws <a href="https://developer.android.com/reference/java/io/IOException.html" title="class or interface in java.io" class="externalLink" target="_top">IOException</a></pre>
<div class="block">Starts an asynchronous operation to transform the given <a href="../MediaItem.html" title="class in com.google.android.exoplayer2"><code>MediaItem</code></a>.

 <p>The transformation state is notified through the <a href="Transformer.Builder.html#setListener(com.google.android.exoplayer2.transformer.Transformer.Listener)"><code>listener</code></a>.

 <p>Concurrent transformations on the same Transformer object are not allowed.

 <p>The output can contain at most one video track and one audio track. Other track types are
 ignored. For adaptive bitrate <a href="../source/MediaSource.html" title="interface in com.google.android.exoplayer2.source"><code>media
 sources</code></a>, the highest bitrate video and audio streams are selected.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>mediaItem</code> - The <a href="../MediaItem.html" title="class in com.google.android.exoplayer2"><code>MediaItem</code></a> to transform. The supported sample formats depend on the
     output container format and are described in <a href="https://developer.android.com/reference/android/media/MediaMuxer.html#addTrack(android.media.MediaFormat)" title="class or interface in android.media" class="externalLink" target="_top"><code>MediaMuxer.addTrack(MediaFormat)</code></a>.</dd>
<dd><code>path</code> - The path to the output file.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://developer.android.com/reference/java/lang/IllegalArgumentException.html" title="class or interface in java.lang" class="externalLink" target="_top">IllegalArgumentException</a></code> - If the path is invalid.</dd>
<dd><code><a href="https://developer.android.com/reference/java/lang/IllegalStateException.html" title="class or interface in java.lang" class="externalLink" target="_top">IllegalStateException</a></code> - If this method is called from the wrong thread.</dd>
<dd><code><a href="https://developer.android.com/reference/java/lang/IllegalStateException.html" title="class or interface in java.lang" class="externalLink" target="_top">IllegalStateException</a></code> - If a transformation is already in progress.</dd>
<dd><code><a href="https://developer.android.com/reference/java/io/IOException.html" title="class or interface in java.io" class="externalLink" target="_top">IOException</a></code> - If an error occurs opening the output file for writing.</dd>
</dl>
</li>
</ul>
<a id="startTransformation(com.google.android.exoplayer2.MediaItem,android.os.ParcelFileDescriptor)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>startTransformation</h4>
<pre class="methodSignature">@RequiresApi(26)
public&nbsp;void&nbsp;startTransformation&#8203;(<a href="../MediaItem.html" title="class in com.google.android.exoplayer2">MediaItem</a>&nbsp;mediaItem,
                                <a href="https://developer.android.com/reference/android/os/ParcelFileDescriptor.html" title="class or interface in android.os" class="externalLink" target="_top">ParcelFileDescriptor</a>&nbsp;parcelFileDescriptor)
                         throws <a href="https://developer.android.com/reference/java/io/IOException.html" title="class or interface in java.io" class="externalLink" target="_top">IOException</a></pre>
<div class="block">Starts an asynchronous operation to transform the given <a href="../MediaItem.html" title="class in com.google.android.exoplayer2"><code>MediaItem</code></a>.

 <p>The transformation state is notified through the <a href="Transformer.Builder.html#setListener(com.google.android.exoplayer2.transformer.Transformer.Listener)"><code>listener</code></a>.

 <p>Concurrent transformations on the same Transformer object are not allowed.

 <p>The output can contain at most one video track and one audio track. Other track types are
 ignored. For adaptive bitrate <a href="../source/MediaSource.html" title="interface in com.google.android.exoplayer2.source"><code>media
 sources</code></a>, the highest bitrate video and audio streams are selected.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>mediaItem</code> - The <a href="../MediaItem.html" title="class in com.google.android.exoplayer2"><code>MediaItem</code></a> to transform. The supported sample formats depend on the
     output container format and are described in <a href="https://developer.android.com/reference/android/media/MediaMuxer.html#addTrack(android.media.MediaFormat)" title="class or interface in android.media" class="externalLink" target="_top"><code>MediaMuxer.addTrack(MediaFormat)</code></a>.</dd>
<dd><code>parcelFileDescriptor</code> - A readable and writable <a href="https://developer.android.com/reference/android/os/ParcelFileDescriptor.html" title="class or interface in android.os" class="externalLink" target="_top"><code>ParcelFileDescriptor</code></a> of the output.
     The file referenced by this ParcelFileDescriptor should not be used before the
     transformation is completed. It is the responsibility of the caller to close the
     ParcelFileDescriptor. This can be done after this method returns.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://developer.android.com/reference/java/lang/IllegalArgumentException.html" title="class or interface in java.lang" class="externalLink" target="_top">IllegalArgumentException</a></code> - If the file descriptor is invalid.</dd>
<dd><code><a href="https://developer.android.com/reference/java/lang/IllegalStateException.html" title="class or interface in java.lang" class="externalLink" target="_top">IllegalStateException</a></code> - If this method is called from the wrong thread.</dd>
<dd><code><a href="https://developer.android.com/reference/java/lang/IllegalStateException.html" title="class or interface in java.lang" class="externalLink" target="_top">IllegalStateException</a></code> - If a transformation is already in progress.</dd>
<dd><code><a href="https://developer.android.com/reference/java/io/IOException.html" title="class or interface in java.io" class="externalLink" target="_top">IOException</a></code> - If an error occurs opening the output file for writing.</dd>
</dl>
</li>
</ul>
<a id="getApplicationLooper()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getApplicationLooper</h4>
<pre class="methodSignature">public&nbsp;<a href="https://developer.android.com/reference/android/os/Looper.html" title="class or interface in android.os" class="externalLink" target="_top">Looper</a>&nbsp;getApplicationLooper()</pre>
<div class="block">Returns the <a href="https://developer.android.com/reference/android/os/Looper.html" title="class or interface in android.os" class="externalLink" target="_top"><code>Looper</code></a> associated with the application thread that's used to access the
 transformer and on which transformer events are received.</div>
</li>
</ul>
<a id="getProgress(com.google.android.exoplayer2.transformer.ProgressHolder)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getProgress</h4>
<pre class="methodSignature"><a href="Transformer.ProgressState.html" title="annotation in com.google.android.exoplayer2.transformer">@ProgressState</a>
public&nbsp;int&nbsp;getProgress&#8203;(<a href="ProgressHolder.html" title="class in com.google.android.exoplayer2.transformer">ProgressHolder</a>&nbsp;progressHolder)</pre>
<div class="block">Returns the current <a href="Transformer.ProgressState.html" title="annotation in com.google.android.exoplayer2.transformer"><code>Transformer.ProgressState</code></a> and updates <code>progressHolder</code> with the current
 progress if it is <a href="#PROGRESS_STATE_AVAILABLE"><code>available</code></a>.

 <p>After a transformation <a href="Transformer.Listener.html#onTransformationCompleted(com.google.android.exoplayer2.MediaItem)"><code>completes</code></a>, this
 method returns <a href="#PROGRESS_STATE_NO_TRANSFORMATION"><code>PROGRESS_STATE_NO_TRANSFORMATION</code></a>.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>progressHolder</code> - A <a href="ProgressHolder.html" title="class in com.google.android.exoplayer2.transformer"><code>ProgressHolder</code></a>, updated to hold the percentage progress if
     <a href="#PROGRESS_STATE_AVAILABLE"><code>available</code></a>.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The <a href="Transformer.ProgressState.html" title="annotation in com.google.android.exoplayer2.transformer"><code>Transformer.ProgressState</code></a>.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://developer.android.com/reference/java/lang/IllegalStateException.html" title="class or interface in java.lang" class="externalLink" target="_top">IllegalStateException</a></code> - If this method is called from the wrong thread.</dd>
</dl>
</li>
</ul>
<a id="cancel()">
<!--   -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>cancel</h4>
<pre class="methodSignature">public&nbsp;void&nbsp;cancel()</pre>
<div class="block">Cancels the transformation that is currently in progress, if any.</div>
<dl>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://developer.android.com/reference/java/lang/IllegalStateException.html" title="class or interface in java.lang" class="externalLink" target="_top">IllegalStateException</a></code> - If this method is called from the wrong thread.</dd>
</dl>
</li>
</ul>
</li>
</ul>
</section>
</li>
</ul>
</div>
</div>
</main>
<!-- ========= END OF CLASS DATA ========= -->
<footer role="contentinfo">
<nav role="navigation">
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a id="navbar.bottom">
<!--   -->
</a>
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<a id="navbar.bottom.firstrow">
<!--   -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../index.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../../allclasses.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
  allClassesLink = document.getElementById("allclasses_navbar_bottom");
  if(window==top) {
    allClassesLink.style.display = "block";
  }
  else {
    allClassesLink.style.display = "none";
  }
  //-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li><a href="#nested.class.summary">Nested</a>&nbsp;|&nbsp;</li>
<li><a href="#field.summary">Field</a>&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li><a href="#field.detail">Field</a>&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a id="skip.navbar.bottom">
<!--   -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
</nav>
</footer>
</body>
</html>
